<html>
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body style="text-align: center">
<div style="margin:0 auto;">
    <h1>用户登录界面</h1>
    <form action="login_from_mysql" method="post">
        <p>用户名:<input type="text" name="username"></p>
        <p>密&nbsp;&nbsp;&nbsp;码:<input type="text" name="passwd"></p>
        <p>记住密码(七天免登陆):<input type="checkbox" name="issaved"></p>
        <button id="fat-btn" class="btn btn-primary" data-loading-text="Loading..." type="submit"> 登录</button>
    </form>
    {% for msg in get_flashed_messages() %}
        {{ msg }}
    {% endfor %}
</div>

<script>
    $(function() {
        $(".btn").click(function(){
            $(this).button('loading').delay(1000).queue(function() {
            // $(this).button('reset');
            // $(this).dequeue();
            });
        });
    });
</script>
<a href="/">返回首页</a>
</body>

</html>